import { createRouter, createWebHashHistory } from 'vue-router'
import LoginView from "../views/LoginView.vue";

const routes = [
  {
    path: '/',
    name: 'Login',
    component:LoginView,
    meta:{title:"登陆页面"}
  },
  {
    path: '/home',
    name: 'home',
    // meta: { requiresAuth: true },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/HomeView.vue'),
    meta:{title:"学生管理系统"}
  },
  {
    path: "/enroll",
    name:"enroll",
    component: () => import("../views/EnrollView.vue"),
    meta:{title:"注册页面"}
  },
  {
    path:"/test",
    name:"test",
    component:() => import("../views/TestView.vue")
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})


export default router
